/**
 * 零基础学C语言
 * 
 * @version 1st
 * @author 明日科技
 * @see http://www.mingrisoft.com
 */

#include <stdio.h>

int main() {
    int n;
    int i = 1;
    int result = 1;

    printf("please enter a number: \n");
    scanf("%d", &n);

    for (; i <= n; i++) {
        result *= i;
    }
    printf("%d! = %d\n", n, result);

    return 0;
}

/*
output:
the result is: 5050
*/